package com.dilidili.esentity;

import com.domain.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @Author Miracle GuGuaGuGua
 * @Date 2022/4/7 17:00
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Document(indexName = "video", shards = 3, replicas = 1)
public class VideoPojo {

    /** 视频id */
    @Id
    private Long videoId;

    /** 视频标题 */
//    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String videoTitle;

    /** 视频分区id */
    private Long videoZoneId;

    /** 视频类型 */
    private Long videoVideotype;

    /** 1 */
    private Long videoIsreprint;

    /** 转载地址 */
    private String videoReprintsite;

    /** 视频路径 */
    private String videoUrl;

    /** 视频发布用户id */
    private Long videoUserId;

    /** 视频推荐文字 */
    private String videoSuggest;

    /** 视频状态 */
    private Long videoState;

    /** 视频封面图片路径 */
    private String videoCover;

    /** 视频在线数 */
    private Long videoOnline;

    /** 视频发布时间 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date videoCreatetime;

    /** 视频时长 */
    private Long videoLength;

    //user对象
    private User user;
    //视频清晰度对象
    private List<VideoSharpness> videoSharpnesses;
    //小分区对象
    private Smallzone smallzone;
    //标签对象
    private List<VideoTag> videoTags;
    //弹幕对象
    private List<Barrage> barrages;
    //弹幕总条数
    private Integer bars;
    //收藏视频总条数
    private Integer cvs;
    //collect_video(收藏视频)
    private List<CollectVideo> collectVideo;
    //大分区对象
    private Integer bid;
}
